#define GLEW_STATIC

#include <SDL2/SDL.h>
#include <stdlib.h>
#include <GL/glew.h>
#include <SDL2/SDL_opengl.h>

#define bool unsigned char
#define Highlighted_Tile 3

#ifndef Graphic_h
#define Graphic_h

/* Input */
typedef struct {
    bool Mouse_1, Mouse_2, Mouse_3;
    int X, Y;
    bool Up, Down, Right, Left;
} G_Input;

/* Mein eigener Rechteck */
typedef struct{
  long X, Y;
  int W, H;
  int MaxW, MaxH;
} G_Rect;

/* Mouse */
typedef struct{
  long X, Y;
  int cX, cY;
  int MoveCamera;
} G_Mouse;

/* Image Datei */
typedef struct {
    GLuint *imageData;
	int	width;
	int	height;
} G_TextureImage;

/* Framenrate */
typedef struct {
    int FPS;
    int pastFPS;
    int past;
    int currentTime;
} G_Framenrate;

/* Timer */
typedef struct {
    int Count;
} G_TimerCount;

#endif

extern int Graphic_WorldWidth;
extern int Graphic_WorldHeight;

extern G_Input Input;
extern G_Mouse Mouse;

/* Init OpenGL */
int Graphic_Init();

/* Human */
int Graphic_InitGL();

/* Framenrate, Zeichnen, Input usw. */
int Graphic_Process();

/* Load */
int Graphic_LoadFiles();

/* Timer */
int Graphic_Timer(Uint32 intervall, void *parameter);


/* Zeichnen */
void Graphic_Tile(int X, int Y, int Data);
int Graphic_Human(int X, int Y, int AddZ, int iAnimation, int Time);

/* Camera*/
void Graphic_Camera( int X, int Y);
void Graphic_SetCamera(int maxW, int maxH);
void Graphic_CentralCamera(int W, int H);

void Graphic_Circle(int X, int Y, float R, int Style);
void Graphic_Test(int X, int Y, float Zoom, char *Title);
void Graphic_BuildIcon(int X, int Y, float Zoom, char *Title);

/* Beenden */
void Graphic_Quit();
